<?php


namespace App\Transformers\Statistics;


use App\Models\ProductLog;
use App\Models\TransactionLog;
use App\Transformers\User\UserTransformer;
use League\Fractal\TransformerAbstract;

class TransactionLogTransformer extends TransformerAbstract
{


    public function transform(TransactionLog $data)
    {
        return [
            'id' => $data->id,
            'user_id' => $data->user_id ?? '',
            'mer_id' => $data->mer_id ?? '',
            'turnover_price' => $data->turnover_price ?? '',
            'transactior_price' => $data->transactior_price ?? '',
            'pay_price' => $data->pay_price ?? '',
            'money_price' => $data->money_price ?? '',
            'price' => $data->price ?? '',
            'number' => $data->number ?? '',
            'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }


}
